{{--{{ Form::open(array('route' => 'mounts.store','files'=>true,'id'=>'pages')) }}--}}


{{--@foreach($areas as $area)--}}
{{--<input type="radio" name="area_id" value="{{ $area->id }}">{{ $area->name }}--}}
{{--@endforeach--}}

{{--<input type="text" name="address">--}}


{{--<input type="text" name="name">--}}
{{--<input type="text" name="mobile">--}}


{{--<input type="radio" name="sex" value="1">男--}}
{{--<input type="radio" name="sex" value="2">女--}}


{{--<input type="checkbox" name="time[]" value="下班后">下班后--}}
{{--<input type="checkbox" name="time[]" value="周末">周末--}}
{{--<input type="checkbox" name="time[]" value="不限">不限--}}




{{--<input type="submit">--}}
{{--{{ Form::close() }}--}}

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="icon" href="img/favicon.ico">
    <title>3X净水计划</title>

    <link href="{{ URL::asset('front/css/bootstrap.min.css') }}" rel="stylesheet">
      <link rel="stylesheet" href="{{ URL::asset('front/fonts/font-awesome.min.css') }}">
    <link href="{{ URL::asset('front/css/extra.css') }}" rel="stylesheet">

<style>
/*弹窗*/
.shadeCon{
  width: 80%;
  max-height: 40%;
  background: rgb(193,214,230);
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 99;
  margin-top: -25%;
  margin-left: -40%;
  -webkit-border-radius:10px;
  -webkit-box-shadow:0 0 2px #d2d1d1;
  text-align: center;
  display: none;
  overflow-y: scroll;
}
.shadeCon ul{
  padding: 0 10px;
}
.shadeCon ul li{
  font-size: 14px;
  color: #123c58;
  line-height: 20px;
  padding: 5px 0;
  font-weight: normal;
  text-align: left;

}
.shadeCon p{
  font-size: 15px;
  width: 100%;
  height: 30px;
  line-height: 30px;
}
.shadeCon span{
  width: 50%;
  height: 28px;
  background: #609ee8;
  display: block;
  -webkit-border-radius:5px;
  border: 1px solid #609ee8;
  display: block;
  font-size: 16px;
  color: #fff;
  line-height: 28px;
  text-align: center;
  margin: 20px auto 10px;
  cursor: pointer;
}
.clo{
  position: fixed;
  top: 40%;
  left: 75%;
  cursor: pointer;
  width: 18px;
  height: 18px;
}
/*遮罩层*/
#shade{
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  position: fixed;
  left:0;
  top: 0;
  z-index: 77;
  display: none;
}

div.menucon{
  width: 100%;
  height: 340px;
  padding-top: 20px;
}
dl.plus_menu{
  width: 40%;
  float: left;
  margin: 5px 5% 8px;
  overflow: hidden;
  -webkit-box-shadow:0 -3px 0px #b7dbf6;
  text-align: center;
  background: #85b9e1;
  -webkit-border-radius:5px;
}
dl.plus_menu dt{
  width: auto;

  -webkit-border-radius:5px;
}
dl.plus_menu dd{
  display: block;
}
dl.plus_menu dt img{
  height: 50px;
  margin: 15px 0;
}
dl.plus_menu dd p{
  margin:5px 0px;
  font-weight: normal;

}

</style>
  </head>

  <body style="padding-top: 0;padding-bottom: 10px;">
<div class="header">
    <img src="{{ URL::asset('front/img/3x-top.jpg') }}" class="img-responsive" width="100%" />
</div>
<div class="container">
    {{--<form action="/index.php/dy/weixin_form_product_info" method="post" id="pipe_form">--}}
    {{ Form::open(array('route' => 'mounts.prepare_store','files'=>true,'id'=>'pages')) }}
    <div class="title"><h3>填写信息<small>（代客户填写）</small></h3></div>
        <input type="hidden" name="code" value="{{ $code }}">
        <div class="row">
            <div class="form-group">
                <label class="col-sm-2 control-label">选择机型</label>
                <div class="col-sm-10">
                    <select class="form-control" name="machine" onchange= "select_machine(this.options[this.options.selectedIndex].value)">
                        @foreach($machines as $machine)
                        <option value="{{ $machine->id }}">{{ $machine->name }}</option>
                        {{--<input type="hidden" id="price_{{ $machine->id }}" value="{{ $machine->price }}">--}}
                        @endforeach
                    </select>
                </div>
            </div>
        </div>


        <div class="row">
            <div class="form-group">
                <label class="col-sm-2 control-label">联系人信息</label>
                <div class="col-sm-10">
                  <div class="input-group">
                  <span class="input-group-addon"><i class="fa fa-user"></i></span>
                  <input type="text" name="name"  class="form-control" placeholder="联系人姓名">
                  </div>
                </div>
            </div>
        </div>

        <div class="input-group mg-t5">
        <label class="radio-inline">
          <input type="radio" name="sex" required id="inlineRadio1" value="1"> 男士
        </label>
        <label class="radio-inline">
          <input type="radio" name="sex" required id="inlineRadio2" value="2"> 女士
        </label>
        </div>
        <input type="hidden" name="area_id" id="area_id" value="">
        <div class="input-group mg-t5">
          <span class="input-group-addon"><i class="fa fa-map-marker fa-lg"></i></span>
          <input id="area" type="text" name="area_name" class="form-control" placeholder="输入完整小区名，或根据提示选择"   onkeyup="javascript:checkWord(this);" onmousedown="javascript:checkWord(this);" >
          <ul id="lookup" style="display: none;">
          </ul>
        </div>


        <div class="input-group mg-t5">
          <span class="input-group-addon"><i class="fa fa-home"></i></span>
          <input type="text" class="form-control"  name="address" placeholder="单元/门牌号">
        </div>



        <div class="input-group mg-t5">
          <span class="input-group-addon"><i class="fa fa-mobile-phone fa-lg"></i>&nbsp;</span>
          <input type="text" class="form-control" name="mobile" placeholder="电话">
        </div>



            <div class="simplebox">
                        	<h1 class="titleh">服务内容</h1>
                            <div class="content">

                              <div class="menucon">
                              {{ Form::model($page, array('method' => 'put', 'route' => array('services.update', $service->id),'id'=>'pages')) }}

                                                @foreach($biaozhuns as $key => $biaozhun)
                                <div class="dlcon">
                                  <dl class="plus_menu">
                                    <dt>
                                      <img src="{{ URL::asset('front/img/leader'.$key.'.gif') }}" alt="" />
                                    </dt>
                                    <dd>
                                      <p>{{ $biaozhun['name'] }}</p>
                                    </dd>
                                  </dl>
                                  <div class="shadeCon">
                                    <img src="{{ URL::asset('front/img/ico77.png') }}" alt="" width="14" height="14" align="absmiddle" class="clo"/>
                                    <p>{{ $biaozhun['name'] }}</p>
                                    <ul>
                                        @foreach($biaozhun['lists'] as $k=> $list)
                                        <li>{{ $list['name'] }}:
                                            @foreach($list['sel'] as $i=> $val)
                                              @if($val != 'txt')
                                                  <input type="checkbox" name="biaozhun[]" value="{{ $key }}_{{ $k }}_{{ $i }}">{{ $val }}
                                              @else
                                                  <input type="text" name="{{ $key }}_{{ $k }}_{{ $i }}" >
                                              @endif
                                            @endforeach
                                        @endforeach
                                     </ul>
                                    <span>确认完成</span>
                                  </div>
                                </div>
                                                  @endforeach
                              </div>
                        </div>
                  </div>


        <hr/>
            <a href="javascript:void (0);" onclick="sub();"><button type="button" class="btn btn-info col-xs-12 col-md-12">完成</button></a>

{{ Form::close() }}

</div>
<div id="shade"></div>

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="{{ URL::asset('front/js/jquery.min.js') }}"></script>
    <script type="text/javascript" charset="utf-8" src="{{ asset('front/js/jquery.validate.min.js') }}"></script>
    <script src="{{ URL::asset('front/js/bootstrap.min.js') }}"></script>
<script type="text/javascript">
$(function(){
  //点击确认完成关闭
  $(".shadeCon span").click(function(e){
    event.stopPropagation()
    $(this).parent().hide();
    $("#shade").hide();
  })
  //点击X箭头关闭
  $(document).on("click",".clo",".shadeCon span",function(){
      $(this).parent().hide();
      $("#shade").hide();
  })
  $("div.dlcon").click(function(e){

    $("#shade").show();
    $(this).find(".shadeCon").show();
  })
})
</script>
    <script>
    function checkWord(obj){
        var content =  $(obj).val();
        $.post('{{ route('mounts.ajax_forwork') }}',{ content:content },function(data){
            if(data == 'no'){
                $('#lookup').hide();
            }else{
                $('#lookup').show();
                $('#lookup').html(data);
            }
        })
    }

    function setit(id,name){
        $('#area_id').val(id);
        $('#area').val(name);
        $('#lookup').hide();
    }

    function select_machine(id){
       var price = $('#price_'+id).val();
       var filter = $('#filter_'+id).val();
       $('#show_price').html(price);
       $('#show_filter').html(filter);
    }

     $(function(){

            $("#pages").validate({
                rules: {
                    machine: "required",
                    name: "required",
                    sex: "required",
                    address: "required",
                    mobile: "required",
                    time: "required"
                },
                messages: {
                    machine: "",
                    name: "",
                    sex: "",
                    address: "",
                    mobile: "",
                    time: ""
                }
            });
        });
    function sub(){
        $('#pages').submit();
    }
    </script>

  </body>
</html>


